<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue render</title>
  <script src="https://lib.baomitu.com/vue/2.6.11/vue.js"></script>
</head>
<body>
  <div id="app"></div>
  <script>
    let TheComp = {
      props: {
        time: {}
      },
      render: function(h) {
        console.log('TheComp render')
        return h('p', '????' + this.time)
      }
    }
    let app = new Vue({
      data () {
        return {
          time: Date.now(),
        }
      },
      methods: {
        handleClick () {
          this.time = Date.now()
        }
      },
      render: function(h) {
        console.log('render', this)
        return h('p', [
          this.time,
          h(TheComp, {
            props: {
              time: this.time
            },
          }),
          h('button', {
            on: {
              click: this.handleClick
            }
          }, '点击')
        ]);
      }
    })
    document.getElementById('app').appendChild(app.$mount(document.createElement('div')).$el)
  </script>
</body>
</html>